<script setup lang='ts'>
import { ProTableOption } from '../components/ProTable/type';

const options: ProTableOption[] = [
    {
        key: 'sex',
        title: '',
        type: 'radio',
        radioAttrs: {
            button: true,
            name: 'sex',
            list: [],
            modelValue: '1',
            variant: "primary-filled"
        },
        span: 12,
        request: async () => {
            return await [
                { label: '已完成订单', value: '0' },
                { label: '未完成订单', value: '1' },
                { label: '待发货订单', value: '2' },
            ]
        },
        // isFormSlot: true
    },
    {
        key: 'name',
        title: '姓名'
    }

]

const request = async () => await ({
    list: [{ name: 'admin' }, { name: '张三' }],
    total: 2
})

</script>

<template>
    <ProTable :options="options" :request="request">
        <template #form-sex>
            <t-col :span="12" class="mb-[20px]">
                <t-button>自定义头部</t-button>
            </t-col>
        </template>
    </ProTable>
</template>

<style scoped>
</style>
